<?php 
$dossierId=$currentObject->dossierid;

	
	?>


	<div id="dentpicker"  >

	 <script type="text/javascript">

    if (swfobject.hasFlashPlayerVersion("6.0.0")) {
        var fn = function() {
          var att = { data:"/<?=getFilesPath("image")?>/cabinetdentchooser.swf", width:"800", height:"247" };
          var par = { wmode:"transparent",flashvars:"selectedindex=<?=$currentObject->dent?>&host=http://<?=getPortalHost()?>/&dossierId=<?=$dossierId?>" };
          var id = "myContent";
          var myObject = swfobject.createSWF(att, par, id);
        };
        swfobject.addDomLoadEvent(fn);
      }
    </script>
 <div id="myContent">
      </div>
</div>
	

<script>
//montantok=false;


	
  

/*
$("input[name='ButterflyPortal_data_NATUREDESOIN']").change(function() {

});
*/

$("#el_DENT").append($("#dentpicker"));
function setdent(dent){

	$("#ButterflyPortal_data_DENT").val(dent);
	//$("#Reload").click();
}
//$("input[name='ButterflyPortal_data_DENT']").change();
//$("#ButterflyPortal_data_DENT").hide();


$(function() {
	  // Handler for .ready() called.
	  
	
	

dent=$("#ButterflyPortal_data_DENT").val();

	$.get("/portlet.php",
			{app: "cabinet",
			operation:"checkmontant",
			dossierId:"<?=$currentObject->dossierid?>",
			natureDeSoin:"<?=$currentObject->naturedesoin?>",
			dent:dent
			},
			   function(data){
	            
				//alert(data);
			if (data=="true") {

				 $("#el_MONTANT").parent().parent().hide();

	
}else{
	
   
	$("#el_MONTANT").parent().parent().show();
}

			});

});

</script>